import logging


HELLO_WORLD = b'Hello world!\n'


def handler(environ, start_response):
    print("...Successfully entered user http function...")

    # 输出日志信息
    logging.getLogger().info("using default user logger...")

    # 测试 evnrion 是否被正确解析
    for key, value in environ.items():
        if key.startswith('HTTP_'):
            # 对请求的信息进行处理
            pass

    # 返回响应
    status = '200 OK'
    response_headers = [('Content-type', 'text/plain')]
    start_response(status, response_headers)

    return [HELLO_WORLD]
